@@ -748,7 +748,6 @@ class ActivityInfo(BaseModelMixin): |
||
748 | 748 |
'coupon_value': self.coupon_value, |
749 | 749 |
'coupon_has_expired': tc.utc_datetime() >= self.final_expire_at(created_at=created_at), |
750 | 750 |
} |
751 |
- |
|
752 | 751 |
|
753 | 752 |
def coupon_info2(self, created_at=None): |
754 | 753 |
return self.coupon_info(created_at=created_at), |
@@ -249,7 +249,7 @@ def refreshs(): |
||
249 | 249 |
logs = ConsumeInfoSubmitLogInfo.objects.filter(verifyResult=1, dupload=False, test_user=False) |
250 | 250 |
|
251 | 251 |
for log in logs: |
252 |
- ymd = tc.local_string(tc.to_local_datetime(log.created_at), format='%Y%m%d') |
|
252 |
+ ymd = tc.local_string(utc_dt=log.created_at, format='%Y%m%d') |
|
253 | 253 |
|
254 | 254 |
try: |
255 | 255 |
mdl = ModelInfo.objects.get(model_id=log.model_id) |
@@ -329,7 +329,7 @@ def refreshs(): |
||
329 | 329 |
'lat': log.lat, |
330 | 330 |
'lon': log.lon, |
331 | 331 |
'phone': log.phone, |
332 |
- 'ymd': tc.local_string(tc.to_local_datetime(log.created_at), format='%Y%m%d'), |
|
332 |
+ 'ymd': tc.local_string(utc_dt=log.created_at, format='%Y%m%d'), |
|
333 | 333 |
'model_id': log.model_id, |
334 | 334 |
'serialNo': log.serialNo |
335 | 335 |
}) |
@@ -345,7 +345,7 @@ def refreshs2(): |
||
345 | 345 |
logs = SaleclerkSubmitLogInfo.objects.filter(dupload=False, test_user=False, test_sn=False, status=True) |
346 | 346 |
|
347 | 347 |
for log in logs: |
348 |
- ymd = tc.local_string(tc.to_local_datetime(log.created_at), format='%Y%m%d') |
|
348 |
+ ymd = tc.local_string(utc_dt=log.created_at, format='%Y%m%d') |
|
349 | 349 |
|
350 | 350 |
try: |
351 | 351 |
brand = BrandInfo.objects.get(pk=log.brand_pk) |
@@ -9,7 +9,7 @@ from utils.redis.rkeys import TODAY_INCOME, TOTAL_INCOME, WEEK_INCOME, WEEK_SOLD |
||
9 | 9 |
|
10 | 10 |
def set_brief_info(uid, ptype, fee, dt=None): |
11 | 11 |
""" 更新简报信息 """ |
12 |
- ymd, week = (tc.local_string(tc.to_local_datetime(dt), format='%Y%m%d'), Week.withdate(dt)) if dt else (tc.local_string(format='%Y%m%d'), Week.thisweek().isoformat()) |
|
12 |
+ ymd, week = (tc.local_string(utc_dt=dt, format='%Y%m%d'), Week.withdate(dt)) if dt else (tc.local_string(format='%Y%m%d'), Week.thisweek().isoformat()) |
|
13 | 13 |
|
14 | 14 |
# 总收入 |
15 | 15 |
r.incr(TOTAL_INCOME % (uid, ptype), fee) |